<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- v-html 把字符串当成HTML渲染,类似innerHtml -->
    <div id="app">
        <!-- {{}}表达式页面刷新时，会在页面有短暂的闪烁
            使用cloak解决
        -->
        <h2>{{dec}}</h2>
        <p v-html="dec+'111"></p>
        <p v-html="3>2 ? dec : '1大于2,傻子吧'"></p>
        <p v-text="dec"></p>

    </div>
    <!-- 引入Vue.js框架 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
    <script type="text/javascript">
            new Vue({
                el:'#app',
                data:{
                    dec:"hello v-text"
                }
            })
    </script>
    
</body>
</html>